package com.sghd.fight.robot.action;

import com.sghd.fight.robot.core.Robot;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class AbstractAction implements Action {
	
	protected static Logger logger = LoggerFactory.getLogger(Action.class);

	@Override
	public void action(Robot robot) {

	}

	public boolean check(Robot robot) {
		if(robot.isClose()){
			logger.debug("机器人[{}]退出, 关闭连接！", robot.getRobotId());
			robot.getClient().close();
			return false;
		}
		return true;
	}
}
